package com.neusoft.neuiotms.dcvm.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.bizcore.web.dto.result.ResultListDTO;
import com.neusoft.neuiotms.dcvm.service.DatabusService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api("对接外部子系统接口")
@RestController
@RequestMapping(value = "/api/w/vendors")
public class VendorController {
    @Autowired
    private DatabusService databusService;

    @ApiOperation("获取门禁刷卡记录")
    @GetMapping("/menjin/{code}")
    public ResultListDTO<?> assetsOfLocation(@PathVariable final String code) {
        final List<Object> data = this.databusService.getMenjinRecord(code);
        return ResultListDTO.success(data);
    }

}
